from django.db import models

# Create your models here.
#职员表
class Staff(models.Model):
    name = models.CharField(max_length=100) #职员名称
    number = models.IntegerField() #职员工号
    sex = models.CharField(max_length=2) #性别
    salary = models.FloatField() #工资
    birth_time = models.DateTimeField() #出生日期

    def __str__(self):
        return self.name
    class Meta:
        unique_together = ("name","number")
